package db;

import java.util.ArrayList;

public class RantanplanContext {
	
	private String driverClass;
	private String connectionUrl;
	private String schema;
	private String user; 
	private String password;
	private String dbAlias;
	
	private ArrayList<String> tableBlackList = null;
	
	
	public String getDriverClass() {
		return driverClass;
	}
	public void setDriverClass(String driverClass) {
		this.driverClass = driverClass;
	}
	public String getConnectionUrl() {
		return connectionUrl;
	}
	public void setConnectionUrl(String connectionUrl) {
		this.connectionUrl = connectionUrl;
	}
	public String getSchema() {
		return schema;
	}
	public void setSchema(String schema) {
		this.schema = schema;
	}
	public String getUser() {
		return user;
	}
	public void setUser(String user) {
		this.user = user;
	}
	public String getPassword() {
		return password;
	}
	public void setPassword(String password) {
		this.password = password;
	}
	
	
	
	public boolean isTableBlacklisted(String tableName) {
		return this.tableBlackList != null && this.tableBlackList.contains(tableName);
	}
	
	public void addTableToBlacklist(String tableName) {
		if (this.tableBlackList == null) {
			this.tableBlackList = new ArrayList<String>();
		}
		this.tableBlackList.add(tableName);
	}
	public String getDbAlias() {
		return dbAlias;
	}
	public void setDbAlias(String dbAlias) {
		this.dbAlias = dbAlias;
	}

}
